{include file="general/header.tpl"}
<div id="path">
	You are here: <a href="/index.php">Home</a> &raquo; <a href="index.php">Administration</a> &raquo; <a href="url_stat.php">My URL Stats</a>
</div>
<div id="main">
	{assign var="session_name" value=#SessionName#}
	<form action="url_stat.php" method="post">
		<div class="search-form-field">
			<label>Filter by keyword:</label>
			<input type="text" name="keyword" value="{$smarty.session.$session_name.mykeywordstat_search_string|escape}" /> <input type="submit" name="{$smarty.const.PAGINATION_RESET_FIELD_NAME}" value="Search" /> ({$smarty.const.WILDCARD_SIGN} for wildcards)
		</div>
	</form>
	<br />
	{if $paginate.total > 0 && $paginate.current_item <= $paginate.total}
		<div class="center">
			{include file="general/pagination_item_range.tpl"}
			<br /><br />
		</div>
	{/if}
	<table>
		<tr>
			<td class="item_header_cell numbers">#</td>
			<td class="item_header_cell no-overflow">Keyword</td>
			<td class="item_header_cell no-overflow">Hits</td>
			<td class="item_header_cell actions">Action</td>
		</tr>
		{counter start=$paginate.first-1 print=false}
		{foreach $url_stats as $url_stat}
			<tr>
				<td class="item_cell numbers">{counter skip="1"}.</td>
				<td class="item_cell no-overflow">{$url_stat.keyword}</td>
				<td class="item_cell no-overflow">{$url_stat.hits}</td>
				<td class="item_cell actions"><a href="url_stat_view.php?id={$url_stat.id_parent}"><img src="../images/view.gif" alt="View" title="View" /></a></td>
			</tr>
		{foreachelse}
			<tr><td colspan="4"><p class="center">No URL stat matches found in the database.</p></td></tr>
		{/foreach}
	</table>
	{if $url_stat@show}
		<div class="center">
			<br />
			{include file="general/pagination_page_number.tpl"}
		</div>
	{/if}
</div>
{include file="general/left.tpl"}
{include file="general/footer.tpl"}